#!/usr/bin/node 

const http = require('http'),
      url = require('url'),
      qs = require('querystring'),
      log = console.log;


http.createServer((req, res) => {
  console.log(req.url);
  
  let addr = url.parse(req.url);
  log(addr.pathname);
  log(addr.query);
  
  log(addr.pathname.split('/'));
  //log(qs.parse(path.query));

  res.end('ok');
}).listen(8080);
